package com.seguriapp.entities;

import java.util.LinkedHashMap;
import java.util.Map;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.seguriapp.base.BaseEntity;

/**
 * Represents a Crime Category entity.
 * 
 * @author Tania Gonzales(taniadgv@gmail.com)
 */
@Entity
@Table(name = "CrimeCategory")
public class CrimeCategory extends BaseEntity {

  private static final long serialVersionUID = -5102040216664675817L;

  @Id
  @GeneratedValue
  private Long id;
  private String name;
  private String description;

  public Long getId() {
    return id;
  }

  public void setId(final Long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(final String name) {
    this.name = name;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(final String description) {
    this.description = description;
  }

  public Map<String, Object> toJsonString() {
    final Map<String, Object> map = new LinkedHashMap<String, Object>();
    map.put("id", id);
    map.put("name", name);
    map.put("description", description);
    return map;
  }

}
